class ShareModel {
  String type;
  String title;
  String? icon;

  ShareModel({
    required this.type,
    required this.title,
    required this.icon,
  });

  factory ShareModel.fromJson(Map<String, dynamic> json) {
    return ShareModel(
      type: json['type'],
      title: json['title'],
      icon: json['icon'],
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'type': type,
      'title': title,
      if (icon != null) 'icon': icon,
    };
  }
}
